﻿<controls:ChildWindow 
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
 xmlns:ESRI_ArcGIS_Client="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client" 
 xmlns:Symbol="clr-namespace:ESRI.ArcGIS.Client.Symbols;assembly=ESRI.ArcGIS.Client" 
 mc:Ignorable="d" xmlns:System="clr-namespace:System;assembly=mscorlib" 
 x:Class="ArcgisStudy.ErrorWindow" Title="错误" FontWeight="Bold" Height="600">


	<controls:ChildWindow.Resources>
		<DataTemplate x:Key="DataTemplate">
			<Grid/>
		</DataTemplate>
		<ControlTemplate x:Key="ValidationToolTipTemplate">
			<Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
				<VisualStateManager.VisualStateGroups>
					<VisualStateGroup x:Name="OpenStates">
						<VisualStateGroup.Transitions>
							<VisualTransition GeneratedDuration="0"/>
							<VisualTransition GeneratedDuration="0:0:0.2" To="Open">
								<Storyboard>
									<DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
										<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
									</DoubleAnimationUsingKeyFrames>
									<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
										<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
									</DoubleAnimationUsingKeyFrames>
								</Storyboard>
							</VisualTransition>
						</VisualStateGroup.Transitions>
						<VisualState x:Name="Closed">
							<Storyboard>
								<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
									<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
								</DoubleAnimationUsingKeyFrames>
							</Storyboard>
						</VisualState>
						<VisualState x:Name="Open">
							<Storyboard>
								<DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
									<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
								</DoubleAnimationUsingKeyFrames>
								<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
									<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
								</DoubleAnimationUsingKeyFrames>
							</Storyboard>
						</VisualState>
					</VisualStateGroup>
				</VisualStateManager.VisualStateGroups>
				<Grid.RenderTransform>
					<TranslateTransform x:Name="xform" X="-25"/>
				</Grid.RenderTransform>
				<Border Margin="4,4,-4,-4" Background="#052A2E31" CornerRadius="5"/>
				<Border Margin="3,3,-3,-3" Background="#152A2E31" CornerRadius="4"/>
				<Border Margin="2,2,-2,-2" Background="#252A2E31" CornerRadius="3"/>
				<Border Margin="1,1,-1,-1" Background="#352A2E31" CornerRadius="2"/>
				<Border Background="#FFDC000C" CornerRadius="2"/>
				<Border CornerRadius="2">
					<TextBlock Margin="8,4,8,4" MaxWidth="250" UseLayoutRounding="false" Foreground="White" Text="{Binding (Validation.Errors)[0].ErrorContent}" TextWrapping="Wrap"/>
				</Border>
			</Grid>
		</ControlTemplate>
		<Style x:Key="TextBoxStyle1" TargetType="TextBox">
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="Background" Value="#FFFFFFFF"/>
			<Setter Property="Foreground" Value="#FF000000"/>
			<Setter Property="Padding" Value="2"/>
			<Setter Property="BorderBrush">
				<Setter.Value>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FFA3AEB9" Offset="0"/>
						<GradientStop Color="#FF8399A9" Offset="0.375"/>
						<GradientStop Color="#FF718597" Offset="0.375"/>
						<GradientStop Color="#FF617584" Offset="1"/>
					</LinearGradientBrush>
				</Setter.Value>
			</Setter>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="TextBox">
						<Grid x:Name="RootElement">
							<Border x:Name="Border" Opacity="1" Background="#FFE9FFBE" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="1" BorderThickness="1">
								<Grid>
									<Border x:Name="MouseOverBorder" BorderBrush="Transparent" BorderThickness="1">
										<ScrollViewer x:Name="ContentElement" BorderThickness="0" IsTabStop="False" Padding="3"/>
									</Border>
								</Grid>
							</Border>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</controls:ChildWindow.Resources>


	<Grid x:Name="LayoutRoot" Width="540">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto"/>
			<RowDefinition/>
			<RowDefinition Height="Auto"/>
		</Grid.RowDefinitions>

		<TextBlock x:Name="IntroductoryText" Grid.Row="0" Margin="0" Text="发生了未知错误。有关详细信息，请与您的管理员联系。" d:IsLocked="True" d:IsHidden="True"/>

		<StackPanel x:Name="ContentStackPanel" Grid.Row="2" Margin="0,6,0,0" d:IsLocked="True" d:IsHidden="True">

			<TextBlock x:Name="LabelText" TextWrapping="Wrap" Margin="0,0,0,2" Text="错误详细信息"/>
			<TextBox x:Name="ErrorTextBox" Height="90" TextWrapping="Wrap" IsReadOnly="True" VerticalScrollBarVisibility="Auto"/>
		<Button x:Name="OKButton" Grid.Row="3" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,10,0,0" TabIndex="0" Content="确定" d:IsLocked="True"/>

		</StackPanel>
		
		<TextBox HorizontalAlignment="Left"   Margin="8,4,0,0" Style="{StaticResource TextBoxStyle1}" VerticalAlignment="Top" Grid.Row="2" Text="TextBox" TextWrapping="Wrap"/>
					
					<Grid x:Name='d' Width="60" Height="15" RenderTransformOrigin="0,0.5" UseLayoutRounding="False" Grid.Row="2" d:LayoutRounding="Auto" HorizontalAlignment="Right" d:IsLocked="True"  >
		                    	<Grid.RenderTransform>
		                    		<TransformGroup>
		                    			<ScaleTransform ScaleY="1"/>
		                    			<SkewTransform/>
		                    			<RotateTransform Angle='45'/>
		                    			<TranslateTransform/>
		                    		</TransformGroup>
		                    	</Grid.RenderTransform>
                        <Border x:Name='dd' Opacity='1' Background='#FF98FF3A'  BorderBrush='Black' CornerRadius='1' BorderThickness='1'>
                            <TextBlock Text='这里写站名' RenderTransformOrigin="0.5,0.5" >
                            </TextBlock>
                        </Border>
                    </Grid>
				<Grid x:Name='ddx' Width="60" Height="15" RenderTransformOrigin="0,0.5" Grid.Row="2" HorizontalAlignment="Right"  >
		                    	<Grid.RenderTransform>
		                    		<TransformGroup>
		                    			<ScaleTransform ScaleY="1"/>
		                    			<SkewTransform/>
		                    			<RotateTransform Angle='-45'/>
		                    			<TranslateTransform/>
		                    		</TransformGroup>
		                    	</Grid.RenderTransform>
                        <Border x:Name='ddd' Opacity='1' Background='#FF98FF3A'  BorderBrush='Black' CornerRadius='1' BorderThickness='1'>
                            <TextBlock Text='这里写站名' RenderTransformOrigin="0.5,0.5" >
                            </TextBlock>
                        </Border>
                    </Grid>
	</Grid>

</controls:ChildWindow>
